{% extends "base.html" %}

{% block container %}
<form class="form-horizontal" method="POST" action="/post/edit/">
    {% csrf_token %}
    <div class="form-group">
        <label class="col-sm-1 control-label">标题</label>
        <div class="col-sm-5">
            <input class="form-control" type="text" name="title" value="{{post.title}}">
        </div>
    </div>

    <hr>

    <div class="form-group">
        <label class="col-sm-1 control-label">内容</label>
        <div class="col-sm-11">
            <textarea class="form-control" rows="20" name="content">{{post.content}}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-1 control-label">Tags</label>
        <div class="col-sm-11">
            <input class="form-control" type="text" name="tags" value="{{tags}}">
        </div>
    </div>

    <input type="hidden" name="post_id" value="{{post.id}}">
    <div class="form-group">
        <div class="col-sm-offset-1 col-sm-6">
            <button type="submit" class="btn btn-default">提交</button>
        </div>
    </div>
</form>
{% endblock %}
